package com.smartcampusbackend.service.impl;

import com.smartcampusbackend.mapper.DepartmentMapper;
import com.smartcampusbackend.model.Department;
import com.smartcampusbackend.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService {
    
    @Autowired
    private DepartmentMapper departmentMapper;
    
    @Override
    public List<Department> listAllDepartments() {
        return departmentMapper.selectList(null);
    }
    
    @Override
    public Department getDepartmentById(Long id) {
        return departmentMapper.selectById(id);
    }
} 
 